﻿namespace Collaboris.Saf.Tracing
{
    using System.Diagnostics;

    using Utils;

    /// <summary>
    /// Defines the trace helper for the SAF engine. The name of the TraceSwitch used by this helper is "SAFTrace".
    /// <remarks>
    /// To see trace messages used by this TraceHelper the following entry need to be added to the application configuration file:
    /// <code>
    /// <configuration>
    /// <system.diagnostics>
    ///  <switches>
    ///    <add name="SAFTrace" value="1" />
    ///  </switches>
    /// </system.diagnostics>
    /// </configuration>
    /// </code>
    /// </remarks>
    /// </summary>
    public class SafTraceHelper : TraceHelper
    {
        private static TraceSwitch traceSwitch = new TraceSwitch("SAFTrace", "Trace switch for the the Saf engine");

        public static TraceSwitch TraceSwitch
        {
            get
            {
                return traceSwitch;
            }
        }        
        
        #region Constructors

        public SafTraceHelper(string ownerClassName)
                : base(ownerClassName, traceSwitch)
        {
        }

        public SafTraceHelper(object OwnerClass) : base(OwnerClass, traceSwitch)
        {
        }

        #endregion Constructors 
    }
}